package com.xmg.day02;

import org.springframework.transaction.annotation.Transactional;

import java.lang.ref.WeakReference;

public class WeakReferenceDemo {
    public static void main(String[] args) {
        WeakReference<M> weakReference = new WeakReference<>(new M());
        System.out.println(weakReference.get());
        System.gc();
        System.out.println(weakReference.get());
    }

    @Transactional
    public void tran(){

    }
}
